package com.zhaungwei.weather.service.impl;

import com.zhaungwei.weather.service.CityDataService;
import com.zhaungwei.weather.service.WeatherDataService;
import com.zhaungwei.weather.service.WeatherReportService;
import com.zhaungwei.weather.vo.Weather;
import com.zhaungwei.weather.vo.WeatherResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Weather Report Service 实现类.
 *
 * @author LeviCoder
 * @create 2019-03-24 12:42
 */
@Service
public class WeatherReportServiceImpl implements WeatherReportService {
    @Autowired
    private WeatherDataService weatherDataService;

    @Override
    public Weather getDataByCitykey(String citykey) {
        WeatherResponse resp = weatherDataService.getDataBycitykey(citykey);
        return resp.getData();
    }
}
